﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;


namespace KanaInput
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {

        public MainWindow()
        {
            InitializeComponent();
        }

        private void MenuItemExit_Click(object sender, RoutedEventArgs e)
        {
            Application.Current.Shutdown();
        }

        private void MenuItemGana_Click(object sender, RoutedEventArgs e)
        {
            this.MenuItem_Click(Input.TYPE.HIRAGANA);
        }

        private void MenuItemKana_Click(object sender, RoutedEventArgs e)
        {
            this.MenuItem_Click(Input.TYPE.KATAKANA);
        }

        private void MenuItemGKA_Click(object sender, RoutedEventArgs e)
        {
            this.MenuItem_Click(Input.TYPE.ALL);
        }

        private void MenuItemAoG_Click(object sender, RoutedEventArgs e)
        {
            this.MenuItem_Click(Input.TYPE.AO_GANA);
        }

        private void MenuItemAoK_Click(object sender, RoutedEventArgs e)
        {
            this.MenuItem_Click(Input.TYPE.AO_KANA);
        }

        private void MenuItem_Click(Input.TYPE type)
        {
            Input input = new Input();
            input.type = type;
            input.Show();
            this.Close();
        }
    }
}
